package com.example.tijianserver.mapper;

import com.example.tijianserver.pojo.OverallResult;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface OverallResultMapper {
    int deleteByPrimaryKey(Integer orId);

    int insert(OverallResult record);

    int insertSelective(OverallResult record);

    OverallResult selectByPrimaryKey(Integer orId);

    int updateByPrimaryKeySelective(OverallResult record);

    int updateByPrimaryKey(OverallResult record);

    @Select("select orId, title, content, orderId from OverallResult where orderId=#{orderId}")
    public List<OverallResult> selectByOrderId(Integer orderId);

    @Select("select * from overallResult where orderId=#{orderId} order by orId")
    public List<OverallResult> listOverallResultByOrderId(Integer orderId);
    @Insert("insert into overallResult values(null,#{title},#{content},#{orderId})")
    public int saveOverallResult(OverallResult overallResult);
    @Update("update overallResult set title=#{title},content=#{content} where orId=#{orId}")
    public int updateOverallResult(OverallResult overallResult);
    @Delete("delete from overallResult where orId=#{orId}")
    public int removeOverallResult(Integer orId);
}